from selenium import  webdriver
from time import sleep
from selenium.webdriver.common.by import By



driver = webdriver.Chrome()
sleep(2)
driver.get("http://www.baidu.com")
driver.maximize_window()
sleep(2)
driver.find_element(By.CSS_SELECTOR,"#kw").send_keys("吴彦祖")
sleep(2)
driver.find_element(By.CSS_SELECTOR,"#su").click()
#滚动条 js语法:  window.scrollTo(x,y)
driver.execute_script("window.scrollTo(0,200)")
sleep(5)
driver.execute_script("window.scrollTo(0,1500)")
sleep(5)
driver.quit()